﻿using System.Drawing;
using System.Windows.Forms;
using Narau.Required_interfaces;

namespace Narau.WindowsForms
{
    class InputBox_WF : ReqIntf_InputBox
    {
        private TextBox m_TextBox;

        //--------------
        // Constructor
        //--------------
        public InputBox_WF(TextBox inTextBox)
        {
            m_TextBox = inTextBox;
        }

        //-----------------------------------------
        // Implementación del interfaz 'InputBox' 
        //-----------------------------------------
        #region ReqIntf_InputBox Members

            public string GetUserEntry()
            {
                return m_TextBox.Text;
            }

            public void SetMark(bool bOK)
            {
                if (bOK)
                {
                    m_TextBox.BackColor = Color.LightSkyBlue;
                }
                else
                {
                    m_TextBox.BackColor = Color.Red;
                }
            }

        #endregion
    }
}
